#ifndef WEBAPPLICATION_H
#define WEBAPPLICATION_H

#include "webhost.h"
#include "qapplication.h"
#include "networkmanager.h"
#include "resourcemanager.h"

class WebApplication: public WebHost {

	Q_OBJECT

private:

	int exitCode;
	QApplication* application;
	NetworkManager* networkManager;
	ResourceManager* resourceManager;
	void setStyleSheet(QString url);
	void setJavaScript(QString url);

public:

	explicit WebApplication(QApplication* application);
	virtual ~WebApplication();
	int getExitCode();

private slots:

	void javaScriptApplicationObjectCleared();

public slots:

	void run();
	void terminate(int exitCode = 0);

};

#endif // WEBAPPLICATION_H
